import request from '@/utils/request'

// 查询优惠券-券包列表
export function listPackage(query) {
  return request({
    url: '/couponPackage/package/list',
    method: 'get',
    params: query
  })
}

// 查询优惠券-券包详细
export function getPackage(id) {
  return request({
    url: '/couponPackage/package/' + id,
    method: 'get'
  })
}

// 新增优惠券-券包
export function addPackage(data) {
  return request({
    url: '/couponPackage/package',
    method: 'post',
    data: data
  })
}

// 修改优惠券-券包
export function updatePackage(data) {
  return request({
    url: '/couponPackage/package',
    method: 'put',
    data: data
  })
}

// 删除优惠券-券包
export function delPackage(id) {
  return request({
    url: '/couponPackage/package/' + id,
    method: 'delete'
  })
}

// 导出优惠券-券包
export function exportPackage(query) {
  return request({
    url: '/couponPackage/package/export',
    method: 'get',
    params: query
  })
}